#字典的生成
cities=['Xiang yang','Xi an','Chong qing']
rank=[1,2,3]
x={  城市.title():排名   for 城市,排名 in zip(cities,rank) }
print(x)
print(x['Xi An'])

from gurobipy import *
print('-----------------------------------------')
Cities=[('A','B'),('A','C'),('B','C'),('B','D'),('C','D')]
print(Cities)
Routes=tuplelist(Cities)
print(Routes)

print('-----------------------------------------')
print('\n\n')
Result=[]
for i,j in Cities:
    if i=='A':
        Result.append((i,j))
print(Result)

print('-----------------------------------------')
print('\n\n')
cities,supply,demand=multidict( {'A':[100,20],
                                 'B':[150,50],
                                 'C':[20,300],
                                 'D':[10,200]} )
print(cities)
print(supply)
print(demand)

